<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>表模型库编辑首页</title>
<link href="../../static/css/normalize.css?twitterbutton" rel="stylesheet" type="text/css"/>
<link href="../../static/css/tricks.css?twitterbutton" rel="stylesheet" type="text/css"/>
<link href="../../static/css/elusive-webfont.css?twitterbutton" rel="stylesheet" type="text/css"/>
<link href="../../static/css/codemirror.css?twitterbutton" rel="stylesheet" type="text/css"/>
<link href="../../static/css/screen.css?twitterbutton" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/plugi/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/jquery.easyui.ext.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.menu.js" type="text/javascript"></script>
<script src="../../static/js/libs/jquery.cookie.min.js" type="text/javascript"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
<script languange="javascript">
	var topWin = window;
	function addTab(title, url){
	    if ($('#tt').tabs('exists', title)){
	        $('#tt').tabs('select', title);
	    } else {
	        var content = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>';
	        $('#tt').tabs('add',{
	            title:title,
	            content:content,
	            closable:true
	        });
	    }
	}
	
	$(function() {
		//使用javascript初始化
		//$('#menu_app1').hide();
		//showTreeMenuBar("menu_app1");
		//$(document).attr("title",$.getUrlParam('projectName'));
		$('#centerFrame').attr('src','TableProjectOverview.html?projectId=' + $.getUrlParam('projectId'));
	});
	
	// 刷新导航栏目录结构
	function reloadNavTree(){
		$('#nav').tree('reload');
	}
	
	function listBySubject(){
		/*$.post('projectTreeJson.do',{'project_id':'20151105190313802'},function(data){
			$('#nav').treegrid('loadData',data);
		},'json');
		*/
		$('#nav').tree('options').url = 'esaas.dmcenter.tm.project.tree.bysubject.do?project_id=P20131008093305481121299';
		$('#nav').tree('reload');
	}
	
	function listByPackage(){
		$('#nav').tree('options').url = 'esaas.dmcenter.tm.package.tree.bystd.do?project_id=P20131008093305481121299';
		$('#nav').tree('reload');
	}
</script>
</head>
<body class="easyui-layout">
		<div data-options="region:'west',title:'导航栏'"
		style="width: 253px; padding: 1px;">
		<ul id="nav" class="easyui-tree"
			data-options="animate:true,
					lines:true,method:'get',
					animate:true,
					url:'../../api/project/tree/package/' + $.getUrlParam('projectId'),
					onClick: function(node){
						if(node.attributes.package_type == '2'){
							addTab(node.text,'ModelTableInfoList.html?projectId=' + $.getUrlParam('projectId') + '&packageId=' + node.id);
						} else if(node.attributes.package_type == '3'){
							addTab(node.text,'ProjectDictItemInfoList.html?projectId=' + node.id);
						} else if(node.attributes.package_type == '4'){
							addTab(node.text,'ProjectDictOptionInfoList.html?projectId=' + node.id);
						} else if(node.attributes.package_type == '99') {
							addTab(node.text,'ProjectErInfoList.html?projectId=' + node.id);				
						}
					}"
			id="menu_app1">
		</ul>
	</div>
	<div data-options="region:'center',title:''" >
	<div id="tt" class="easyui-tabs" fit="true" border="false">
		<div title="表模型库概览" style="padding:0px" border="false" fit="true">
			<iframe id="centerFrame" name="centerFrame" height="100%" width="100%" frameborder="0" scrolling="auto"></iframe>
		</div>
	</div>
</div>
</body>
</html>